#include <stdio.h>
int sum,smax,emax,smin,emin,avg;
int sam(int x,int y){//计算总分
    sum = sum + x + y;
    return sum;
}
int main(){
    int math[5],eng[5];
    for(int i =0;i<5;i++){
        scanf("%d %d",&math[i],&eng[i]);
    }
    for(int i=0;i<5;i++){
        printf("数学分:%d",math[i]);
    }
    printf("\n");
    for(int i=0;i<5;i++){
        printf("英语分:%d",eng[i]);
    }
    for(int i=0;i<5;i++){
        sam(math[i],eng[i]);
    }
    smax = math[0];
    emax = eng[0];
    for(int i=1;i<5;i++){
        if(math[i]>smax){
            smax = math[i];
        }
        if(eng[i]>emax){
            emax = eng[i];
        }
    }
    smin = math[0];
    emin = eng[0];
    for(int i=1;i<5;i++){
        if(smin>math[i]){
            smin = math[i];
        }
        if(emin>eng[i]){
            emin = eng[i];
        }
    }
    printf("平均分为:%d\n",sum/(sizeof(math)/4+sizeof(eng)/4));
    printf("数学最高分%d\n",smax);
    printf("英语最高分%d\n",emax);
    printf("数学最低分%d\n",smin);
    printf("英语最低分%d\n",emin);
    printf("总分为%d\n",sum);
    return 0;
}